//将下面的异步代码使用promise的方式改进

setTimeout(function () {
  var a = 'hello';
  setTimeout(function () {
    var b = ' lagou ';
    setTimeout(function () {
      var c = 'i love u';
      console.log(a + b + c);
    }, 10);
  }, 10);
}, 10);


let promise=new Promise((resolve,reject)=>{
  resolve('hello')
})
promise.then((value)=>{
    return value
}).then((value)=>{
  return value+' lagou '
}).then((value)=>{
  console.log(value+"i love u")
})


function myinstance(obj1,obj2){
   let a=obj1.__proto__;
   while(a){
     if(a=== obj2.prototype)return true
     a=a.__proto__
   }
   return false
}
function Peple(name){
  this.name=name
}
let person = new Peple('zs')

console.log(myinstance(person,String),'test')